﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using QLACQUY.DTO;
using QLACQUY.DAO;
using System.Collections;

namespace QLACQUY.BUS
{
    class SanPhamBUS
    {
        public int themSanPham(SanPhamDTO dto)
        {
            SanPhamDAO dao = new SanPhamDAO();
            return dao.Them(dto);
        }
        public int xoaSanPham(int masp)
        {
            SanPhamDAO dao = new SanPhamDAO();
            return dao.Xoa(masp);
        }
        public int capNhatSanPham(SanPhamDTO dto)
        {
            SanPhamDAO dao = new SanPhamDAO();
            return dao.CapNhat(dto);
        }
        
        public ArrayList layDanhSach()
        {
            SanPhamDAO dao = new SanPhamDAO();
            return dao.layDanhSach();
        }
        public ArrayList layDanhSachTheoQuyCach(string QuyCach)
        {
            SanPhamDAO dao = new SanPhamDAO();
            return dao.layDanhSachTheoQuyCach(QuyCach);
        }
        public ArrayList layDanhSachTheoNhaSanXuat(string nsx)
        {
            SanPhamDAO dao = new SanPhamDAO();
            return dao.layDanhSachTheoNhaSanXuat(nsx);
        }
        public SanPhamCRT layThongTinSanPham(int masp)
        {
            SanPhamDAO dao = new SanPhamDAO();
            return dao.layThongTinSanPham(masp);
        }
    }
}
